package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 视频(Video)表实体类
 *
 * @author makejava
 * @since 2021-09-24 12:43:05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("video")
public class Video implements Serializable {

    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;
    //标题
    @TableField("title")
    private String title;
    //简介
    @TableField("intro")
    private String intro;
    //up主id
    @TableField("uid")
    private Integer uid;
    //视频封面链接
    @TableField("cover")
    private String cover;
    //视频播放链接
    @TableField("link")
    private String link;
    //分类id
    @TableField("category_id")
    private Integer categoryId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_at")
    private Date updatedAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("deleted_at")
    private Date deletedAt;


}

